CC = gcc
LIB_PATH := /usr/lib   
SRC_PATH := ./src
INC_PATH := ./head
MXML_INC_PATH := /usr/include/libxml2/ 
ALL_INC_PATH := -I$(INC_PATH) -I$(MXML_INC_PATH)
CFLAGS := -Wall -g $(ALL_INC_PATH)
LIB_ALL =  -L$(LIB_PATH) -lxml2
SRC_FILES = $(wildcard $(SRC_PATH)/*.c)
OBJ_FILES = $(patsubst %.c, %.o, $(SRC_FILES))
TARG_OBJ = Acquisition-2440
DEPS_FILE = makefile.deps
 
all:$(TARG_OBJ) $(DEPS_FILE)
 
$(TARG_OBJ):$(OBJ_FILES)
	$(CC) -o $@ $^ $(LIB_ALL)
         
$(DEPS_FILE):$(SRC_FILES)
	$(CC) -MM $(ALL_INC_PATH) $^ > $(DEPS_FILE)
 
-include $(DEPS_FILE)
 
 
.PHONY:libs
libs:
	cd $(LIB_PATH)&&$(MAKE)
     
.PHONY:cleanlibs
cleanlibs:
	cd $(LIB_PATH)&&$(MAKE) clean
 
 
.PHONY:clean
clean:
	-rm -f $(OBJ_FILES) $(DEPS_FILE)
